Skip to content

Audit DeviceManagement.Administration shared directives for v3 - #3857

Open
Ramses Sanchez-Hernandez (ramsessanchez) wants to merge 10 commits into
powershell-v3from
ramsessanchez-devicemanagement-administration-v3
Open

Ramses Sanchez-Hernandez (ramsessanchez) wants to merge 10 commits into
powershell-v3from
ramsessanchez-devicemanagement-administration-v3

Conversation

@ramsessanchez

@ramsessanchez Ramses Sanchez-Hernandez (ramsessanchez) commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Changes proposed in this pull request

Migrate/audit only the four shared DeviceManagement.Administration.md cmdlet directives. Keep the original AutoRest directives active, with finite reviewed ledger evidence and module regression coverage.

Shared group Reviewed v1.0 disposition
New GroupPolicyMigrationReport No matching routes in actual legacy or compatible v1.0 specifications; no invented override.
Remove GroupPolicyUploadedDefinitionFile No matching routes in either source; no invented override.
VirtualEndpoint audit-event/cloud-PC writes Reuse six existing exact derived suppressions; preserve the GET-only audit-activity/source-image functions.
VirtualEndpoint singleton writes Reuse two existing exact derived suppressions. Preserve GET and nested writes; neither source declares singleton POST.

Preserve curated DeviceManagementPartner names and current Administration-owned actions, including reboot. No duplicate configuration, revival of DeviceManagement.Actions, new grouped variants, or unrelated naming expansion.

Scope: v1.0 only. Beta has a legacy spec but no compatible spec: explicitly excluded, not asserted API-absent, and neither generated nor invoked. Global src/readme.graph.md and every profile-local directive remain ignored/unchanged. Parameter aliases/transforms and schema/response classes remain deferred; none occur in this shared file. Only PowerShell 7/Core is supported.

Final normal #3886 revalidation

Current target: 6475f3f5beb4908d39ea356db32bf1e0fd3273cb. Normally integrated through 228cd9910730083d7f99fc35eb468ec2370a41a2, preserving all prior commits/PR history. Module-only source regression correction 46a069e7fd8f0f349659ff3a74c05b83a576bd53 pins the actual deviceImages PATCH operation and audits actual native required-query declarations, including referenced/inherited parameters.

Separate combined v1.0 generation commit: eb0980fe11f02af39080845334c28a074128bd6e. Full Kiota/client/cmdlet/project/manifest generation produces 107 changed cmdlet files: removes implicit GET readback from all 24 surviving PATCH operations; remaining changes are generator formatting only. Client, projects and locks are genuinely unchanged. No generated sources were edited manually; no binaries/bin/obj/packages/logs are committed. Both new commits and the normal merge include the Copilot App coauthor trailer. No rebase, amend, force-push, copied framework fix, or new PR.

Original audit/generation boundaries remain, including 06fc5fadae, 0a6d2871fb, normal #3849 integration 37874978a7, API/evidence correction 20c3c6b926, generation ac1ae93b52, normal Authentication merge f41717bdc9, and generation 03e55d2fbd. Earlier target evidence is retained unchanged, not relabeled as this final run.

Current identities and acceptance environment

  • Compatible spec blob 5862c30fc2038a9739fb2245a8ab013b6beb2368; actual legacy v1.0 blob bf9fad2edc2078a0430703b612def1c0b12ac154. Same-profile exact IDs/methods/paths and complete reviewed selection remain pinned.
  • Normal adapted Authentication 2.41.2 from C:\Users\ramsess\.copilot\session-state\4aa86cf9-d43c-4d2b-a4a3-aeaed01b8f29\files\authentication-v2-sync\final-source\modules, not a Gallery package or old 2.38.1. All 64 file SHA256s verified; physical package SHA256 2FC09BFE6B70D313BC56DF8ADCCFB1976FB4E90A1898BF8A916B4B8B792898EB. Shipping Auth/runtime/templates remain source-equivalent after the final merge.
  • Isolated Kiota 1.36.1+fd3bf87790149b87f40f7eae1a5feb9016625943; process-local parallelism 1 and complete ordered PSModulePath beginning with that adapted package. PowerShell 7.6.9 / .NET SDK 10.0.403. Fresh child import verifies the exact Auth root.
  • Normal manifest requires Auth 2.41.2, with no RequiredAssemblies/preloads or shims. Fresh bin and normal package contain exactly three owned client/runtime/module DLLs; Authentication owns the single Kiota/RMS/URI closure.

New evidence root:
C:\Users\ramsess\.copilot\session-state\5765d402-0274-4b30-920f-98fb6167d633\files\post3886-6475-final

Exact current commands and outcomes

dotnet test .\tools\WrapperGenerator.Tests\WrapperGenerator.Tests.csproj --no-restore --filter 'FullyQualifiedName~DeviceManagementAdministrationDirectiveMigrationTests|FullyQualifiedName~CmdletConfiguratorTests|FullyQualifiedName~NamingTests|FullyQualifiedName~RequiredQueryTests|FullyQualifiedName~PatchOperationTests' --logger 'trx;LogFileName=targeted.trx' --results-directory C:\Users\ramsess\.copilot\session-state\5765d402-0274-4b30-920f-98fb6167d633\files\post3886-6475-final --verbosity quiet

Passed: actual TRX 179 total / 179 executed / 179 passed / 0 failed / 0 not executed, including 25 own-module cases. The actual module has zero required native-query operations; optional query/list inputs remain independent. Required-query framework regressions are included, without inventing required inputs for this module. Existing NU1903 dependency advisory remains; no unrelated framework test fixes.

.\tools\Get-WrapperDirectiveMigrationInventory.ps1 -Module DeviceManagement.Administration -FailOnUnresolved -OutputPath C:\Users\ramsess\.copilot\session-state\5765d402-0274-4b30-920f-98fb6167d633\files\post3886-6475-final\strict-inventory.json

Passed: 4 rows / 4 Mapped / 0 Deferred / 0 Unresolved, operation counts 0/0/6/2. Uses normal literal inventory, no Legacy bridge/translation fields.

pwsh -NoProfile -NonInteractive -File C:\Users\ramsess\.copilot\session-state\871a5292-dc5b-423e-8083-5165b0006603\files\Invoke-QueuedModuleBuild.ps1 -RepoRoot C:\Users\ramsess\Repos\copilot-worktrees\msgraph-sdk-powershell\ramsessanchez-miniature-dollop -Module DeviceManagement.Administration -ApiVersion v1.0 -Configuration Release
dotnet build .\src\DeviceManagement.Administration\wrapper\v1.0\Microsoft.Graph.Wrapper.DeviceManagement.Administration.csproj -c Release --no-incremental --no-restore --nologo -v quiet

Passed: unchanged four-mutex queue FULL compatible-spec Release pipeline exit 0 / OK / 199 exports / 104.2 seconds, followed by supplemental no-incremental compilation exit 0 / 0 errors. Existing ManagedIdentityCredential obsolescence warning remains. No SkipKiota, GenerateOnly, NoCollisionData, beta generation or legacy fallback. Final authored input hashes match the completed build.

pwsh -NoProfile -NonInteractive -File C:\Users\ramsess\.copilot\session-state\5765d402-0274-4b30-920f-98fb6167d633\files\post3886-6475-final\Test-AdministrationAcceptance.ps1 -RepoRoot C:\Users\ramsess\Repos\copilot-worktrees\msgraph-sdk-powershell\ramsessanchez-miniature-dollop -Environment Global
pwsh -NoProfile -NonInteractive -File C:\Users\ramsess\.copilot\session-state\5765d402-0274-4b30-920f-98fb6167d633\files\post3886-6475-final\Test-AdministrationAcceptance.ps1 -RepoRoot C:\Users\ramsess\Repos\copilot-worktrees\msgraph-sdk-powershell\ramsessanchez-miniature-dollop -Environment USGov

Both passed on fresh normal manifests: 199 exports / 199 GraphRoute records / 8 selected suppressed routes / 10 absent selected names / 13 exact neighbors. Audits all 24 compiled/source PATCH routes for no implicit GET. Captures 14 authenticated offline requests per cloud / zero live requests using real Connect-MgGraph + real GraphHttpClientFactory token pipeline + terminal-only capture handler.

  • Actual deviceImages PATCH 204: exactly one PATCH / no output / no GET, with GET deliberately configured to return 403. Typed JSON/body/path IDs and native headers retained.
  • Actual deviceImages PATCH 200: exactly one PATCH, returning its actual CloudPcDeviceImage model; no GET. No PassThru/readback switch or GET-only Property/Expand requirements added.
  • Caller-explicit GET is independently denied with its normal error, or explicitly selected with its own $select, headers, typed result and separate request.
  • Preserves singleton GET, default list/query dispatch, escaped natural-ID item routing, GET-only typed function, typed POST JSON/result, bodyless DELETE and bodyless reboot. Invalid item/list-only bindings fail before HTTP.
  • New/Update/Remove/Restart each prove WhatIf zero HTTP and genuine No confirmation zero HTTP / exactly one prompt (four prompts).
  • Same client/profile reuses adapter; request-context and reconnect rebuild it; disconnect retains NoGraphSession. Shared factory client/BaseAddress remains unchanged while selected requests preserve Global /v1.0 or USGov /v1.0 roots.
  • Loaded Auth/Kiota/RMS/URI identities are singular, from the exact package, with expected contexts.

Runtime-isolation addendum applied to the first final runtime run: additional-runspace module imports happen before Connect. The existing normal Set-MgTestDataStore helper is reapplied after the last import, and the reflected real shared datastore type is asserted/recorded at eight stages per cloud, before Connect/HTTP/mutations/request-context/reconnect/logout and after logout. Every actual type is Microsoft.Graph.Authentication.Test.Mocks.MockDataStore; helper source hash 88632E6F77B70B6AFF6E269E1EE9CB8A8EED63721321629C075248AEB8D2247C. Proofs: actual-datastore-Global.json, actual-datastore-USGov.json, and compiled-v1.0-Global.json / compiled-v1.0-USGov.json. No extra source/build/TRX/generation rerun was done for this probe setup correction; no production Auth/OnImport changes.

pwsh -NoProfile -NonInteractive -File C:\Users\ramsess\.copilot\session-state\5765d402-0274-4b30-920f-98fb6167d633\files\post3886-6475-final\Pack-AdministrationEvidence.ps1 -RepoRoot C:\Users\ramsess\Repos\copilot-worktrees\msgraph-sdk-powershell\ramsessanchez-miniature-dollop

Passed: supplemental standard dotnet pack --no-build, repository nuspec recipe, exact three owned DLLs/normal manifest hash-equal to completed build, Auth dependency 2.41.2, no duplicate dependency closure. Package SHA256 EC5A38C4F2A395B8209102E8855178BE6F83A18010724E42AB67E1FEA636B650.

pwsh -NoProfile -NonInteractive -File .\tools\Compare-WrapperCmdletNames.ps1 -GeneratedPath .\src\DeviceManagement.Administration\wrapper\v1.0\Cmdlets -OutLedger C:\Users\ramsess\.copilot\session-state\5765d402-0274-4b30-920f-98fb6167d633\files\post3886-6475-final\parity-v1.0.csv

Frozen raw limitation, not a passing parity gate: exit 1, 198/199 routes match, no skips/NO ROUTE. The top-level Get-MgDeviceManagementAuditEventGetAuditActivityTypesWithCategory versus oracle Get-MgDeviceManagementAuditEventAuditActivityType mismatch predates this migration, outside the shared selected operations. No naming sweep or normalization.

Limits: these representative offline transport contracts are not live tenant/service certification. No required-native-query endpoints exist in this module; zero-query and existing optional/binder contracts were checked instead. No new grouped/composite variants were authored. No unmerged #3881 PostPath or #3897 optional-query capability expansion. Earlier reports where PATCH was unprobed, implicit GET/refetch was expected, or datastore guards were absent remain historical; they are not this current positive contract proof.

Canonical current handoff post3886-6475-final\handoff.json retains scalar test/build/strict counters, exact commits/specs/package/source hashes, actual datastore stages and absolute artifact SHA256s. Earlier proof folders are unchanged.

Other links

Record v1.0 reviewed coverage for all four shared suppression groups. Reuse the existing eight derived suppressions, document two absent Group Policy subjects and excluded compatible beta, and pin source IDs plus unaffected neighbors without importing profile-local or historical Actions directives.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run full queued Release generation against the approved compatible v1.0 spec (41f3166). Build succeeds with 199 compiled exports. Client and cmdlet source content, projects, and wrapper lock are unchanged after Git line-ending normalization; only the client lock tool version changes from Kiota 1.34.1 to 1.36.1. This is the combined v1.0 generation boundary, not a skipped client build.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep v1.0 generation context separate from run settings and explicitly pass it to naming and suppression with oracle data on and off. Refresh exact compatible operation IDs now aligned with actual legacy source after the target OpenAPI updates. All four shared groups map; integrated targeted regressions pass.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run the full queued compatible-spec Release pipeline after normal target integration of #3849. Exit 0, module OK, 199 exports in 121 seconds. The combined profile delta refreshes Kiota models and client description hash for spec5862c30fc2038a9739fb2245a8ab013b6beb2368; cmdlet source, projects and wrapper lock remain identical after Git normalization. Fresh compiled checks confirm eight selected write routes suppressed, eleven exact neighbor routes, three dispatchers and two mutation WhatIf/Confirm surfaces. Beta remains excluded.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…nistration

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…wnership

Full queued compatible-spec v1.0 Release generation on844672d7c2 succeeds with adapted Authentication2.41.2, Kiota1.36.1, 199 exports in22seconds. The combined profile output updates174 generated request callers to explicit v1.0 context and regenerates the wrapper project for the single Auth-owned dependency closure. Client and lock outputs remain unchanged. Fresh normal-manifest Global/USGov offline factory checks cover199GraphRoutes,8selected suppressions,12exactneighbors, typed POST, bodyless DELETE/reboot, invalid binder0HTTP, and genuine declined confirmations. Bin and package contain only3owned DLLs with no dependency preload. No excluded beta output or unrelated naming changes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Cover the real deviceImages PATCH generation after normal3886: one native PATCH, its own typed body/header/result, no GET readback or GET-only query dependency. Audit actual compatible module parameters (including referenced/inherited declarations) for zero mandatory native query surfaces. Preserve all four shared directive dispositions and separate v1 generation context.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run FULL queued v1.0 Release client/cmdlet/project/manifest generation on normally merged6475f3f5be: exit0, moduleOK,199exports in104.2seconds, followed by successful no-incremental compile. Combined profile delta removes automatic readback from24 surviving PATCH cmdlets; remaining generator formatting changes preserve public behavior. Client/projects/locks are unchanged. Fresh Global/USGov real authenticated factory probes prove PATCH204 onePATCH/nooutput/noGET with GET403, PATCH200 actualtypedmodel/onePATCH, independent callerGET, preservedroutes/bodies/binders/WhatIf/genuineNo, and guarded post-import shared MockDataStore. Excluded beta remains untouched.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant